package com.yuexunit.finance.member.entity.lexicon;

/**
 * Created by HuangYH on 2015/9/24.
 */
public enum AuthenticationEnum {

	NOTCERTIFIED("未认证"), INAUTHENTICATION("实名待审核"), PAID("已打款待认证"), ACSUCCESS("认证成功"), ACFAILED("认证失败"), NAMEREJECTION("实名被驳回"), PENDINGVERIFICATION("已打款中"), MONEY_ERROR("金额输入不正确"), TOPAY_ACFAILED("打款信息错误");

	private final String auditState;

	AuthenticationEnum(String auditState) {
		this.auditState = auditState;
	}

	public String getValue() {
		return auditState;
	}

	/**
	 * 数字转为枚举类型
	 * @param value 0:未认证 /1:实名待审核/2:已打款待认证/3: 认证成功/4:认证失败/5:实名被驳回/6:已打款中/7:金额输入不正确
	 * 
	 */
	public static AuthenticationEnum valueOf(Integer value) {
		if (value == null || values().length <= value.intValue()) {
			return NOTCERTIFIED;
		}
		return values()[value.intValue()];
	}

	/**
	 * 数字转为枚举类型
	 * @param value 0:未认证/1: 认证中 /2:打款已认证/3:认证成功/4: 认证失败/5:实名被驳回/6:已打款待验证/7:金额输入不正确
	 * @return 审核状态枚举
	 */
	public static AuthenticationEnum valueOfEnable(Integer value) {
		if (value == null || values().length <= value.intValue()) {
			return null;
		}
		return values()[value.intValue()];
	}

}
